//
//  AsyncImageView.h
//  nonghubao
//
//  Created by 王 文彬 on 13-3-12.
//  Copyright (c) 2013年 Chongqing Nonghubao Co., Ltd. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Config.h"
#import "ASMediaFocusManager.h"

@interface ASImageView : UIView <ASMediasFocusDelegate>
{
    UIImageView*   _imageView;
    UIImage*       _image;
    UIImage*       _sourceImage;
    NSURL*         _sourceURL;
    PictureStyle   _pictureStyle;
    ASMediaFocusManager* _mediaManager;
    
    NSURLConnection* connection;
    NSMutableData* data;
}

@property (nonatomic, strong) UIImage* image;
@property (nonatomic, strong) NSURL* sourceURL;
@property (nonatomic, strong, readonly) UIImageView* imageView;

// 设置一个图片的URL
- (void)setImageURL:(NSURL *)URL andSourceImageURL:(NSURL *)sourceURL forStyle:(PictureStyle)style;

// 设定边框样式
- (void)setBorderWithColor:(UIColor *)color andWidth:(float)width;

@end
